import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, Image, 
  ImageBackground,TouchableOpacity,
  Easing,Dimensions,TextInput
} from 'react-native';
const {height, width} = Dimensions.get('window');

export default class BackButton extends Component{
  _back(){
		let navigation = this.props.navigation
		if(navigation){
			//console.log("="+navigation.state.routeName+'=')
			if(navigation.state.routeName!=''){
				this.props.navigation.pop()
			}
		}
	}
  render(){
    return(
      <TouchableOpacity  activeOpacity={0.5}   
						hitSlop={{top: 5, left: 10, bottom: 5, right: 10}}
						style={styles.left} 
						onPress={()=>{this._back()}}>
        <Image style={styles.backImg} source={require('../images/mine/back.png')}/>
      </TouchableOpacity>
    )
  }
}
const styles = StyleSheet.create({
  backImg:{
		resizeMode:'contain',
		width: '100%',
		height: '100%',
	},
  left:{
		width: 24,
		height: 30,
		justifyContent:'center',
		alignItems:'center',
		marginLeft:10,
		marginRight:21,
	},
  
})